home *** CD-ROM | disk | FTP | other *** search
/ PC Users 1998 March / Pc Users extra 6.iso / pshare95 / prog / pvie / pview.exe / data.1 / cal.Frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-12-16  |  5.2 KB  |  188 lines

  1. VERSION 5.00
  2. Object = "{B5805B21-2D86-11D0-ADA6-00400520799C}#1.0#0"; "PVCALCTL.OCX"
  3. Begin VB.Form CalFrm 
  4.    Caption         =   "Calendar"
  5.    ClientHeight    =   1980
  6.    ClientLeft      =   2115
  7.    ClientTop       =   1395
  8.    ClientWidth     =   4335
  9.    LinkTopic       =   "Form3"
  10.    PaletteMode     =   1  'UseZOrder
  11.    ScaleHeight     =   1980
  12.    ScaleWidth      =   4335
  13.    Begin VB.CommandButton Command2 
  14.       Caption         =   "Close"
  15.       Height          =   375
  16.       Left            =   120
  17.       TabIndex        =   7
  18.       Top             =   0
  19.       Visible         =   0   'False
  20.       Width           =   855
  21.    End
  22.    Begin VB.CommandButton Command1 
  23.       Caption         =   "Show Calendar"
  24.       Height          =   495
  25.       Left            =   2760
  26.       TabIndex        =   6
  27.       Top             =   240
  28.       Width           =   1455
  29.    End
  30.    Begin VB.OptionButton Option5 
  31.       Caption         =   "One Month"
  32.       Height          =   255
  33.       Left            =   240
  34.       TabIndex        =   5
  35.       Top             =   1560
  36.       Width           =   1215
  37.    End
  38.    Begin VB.OptionButton Option4 
  39.       Caption         =   "Three Months (Vertical)"
  40.       Height          =   255
  41.       Left            =   240
  42.       TabIndex        =   4
  43.       Top             =   1200
  44.       Width           =   2055
  45.    End
  46.    Begin VB.OptionButton Option3 
  47.       Caption         =   "Three Months (Horizontal)"
  48.       Height          =   255
  49.       Left            =   240
  50.       TabIndex        =   3
  51.       Top             =   840
  52.       Width           =   2175
  53.    End
  54.    Begin VB.OptionButton Option2 
  55.       Caption         =   "Six Months"
  56.       Height          =   255
  57.       Left            =   240
  58.       TabIndex        =   2
  59.       Top             =   480
  60.       Width           =   1095
  61.    End
  62.    Begin VB.OptionButton Option1 
  63.       Caption         =   "Full Year"
  64.       Height          =   255
  65.       Left            =   240
  66.       TabIndex        =   1
  67.       Top             =   120
  68.       Value           =   -1  'True
  69.       Width           =   1095
  70.    End
  71.    Begin PVCalendarLib.PVCalendar Calendar1 
  72.       Height          =   7485
  73.       Left            =   120
  74.       TabIndex        =   0
  75.       Top             =   480
  76.       Visible         =   0   'False
  77.       Width           =   9540
  78.       _Version        =   65536
  79.       _ExtentX        =   16828
  80.       _ExtentY        =   13203
  81.       _StockProps     =   228
  82.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  83.          Name            =   "MS Sans Serif"
  84.          Size            =   8.25
  85.          Charset         =   0
  86.          Weight          =   400
  87.          Underline       =   0   'False
  88.          Italic          =   0   'False
  89.          Strikethrough   =   0   'False
  90.       EndProperty
  91.       Appearance      =   1
  92.       Format          =   4
  93.       SundayColor     =   255
  94.    End
  95.    Begin VB.Label Label1 
  96.       Caption         =   "Double-click a date or select a date and click the Close button."
  97.       Height          =   375
  98.       Left            =   1080
  99.       TabIndex        =   8
  100.       Top             =   0
  101.       Visible         =   0   'False
  102.       Width           =   2295
  103.    End
  104. Attribute VB_Name = "CalFrm"
  105. Attribute VB_GlobalNameSpace = False
  106. Attribute VB_Creatable = False
  107. Attribute VB_PredeclaredId = True
  108. Attribute VB_Exposed = False
  109. Dim TempLeft As Long
  110. Private Sub Calendar1_DblClick()
  111. DateFrm.PVDate21.value = Calendar1.value
  112. Unload CalFrm
  113. End Sub
  114. Private Sub Command1_Click()
  115. If (Option1.value) = True Then
  116.    Rem full year
  117.    Calendar1.Format = 4
  118.    CalFrm.Width = 9900
  119.    CalFrm.Height = 8500
  120. End If
  121. If (Option2.value) = True Then
  122.    Rem half year
  123.    Calendar1.Format = 3
  124.    CalFrm.Width = 9900
  125.    CalFrm.Height = 4800
  126. End If
  127. If (Option3.value) = True Then
  128.    Rem qtr year (horz)
  129.    Calendar1.Format = 1
  130.    CalFrm.Width = 9900
  131.    CalFrm.Height = 3000
  132. End If
  133. If (Option4.value) = True Then
  134.    Rem qtr year (vert)
  135.    Calendar1.Format = 2
  136.    CalFrm.Width = 3500
  137.    CalFrm.Height = 6700
  138. End If
  139. If (Option5.value) = True Then
  140.    Rem single month
  141.    Calendar1.Format = 0
  142.    CalFrm.Width = 3500
  143.    CalFrm.Height = 3000
  144. End If
  145. Command1.Visible = False
  146. Option1.Visible = False
  147. Option2.Visible = False
  148. Option3.Visible = False
  149. Option4.Visible = False
  150. Option5.Visible = False
  151. Calendar1.Left = TempLeft
  152. Calendar1.Visible = True
  153. Command2.Visible = True
  154. Label1.Visible = True
  155. End Sub
  156. Private Sub Command2_Click()
  157. DateFrm.PVDate21.value = Calendar1.value
  158. Unload CalFrm
  159. End Sub
  160. Private Sub Form_Initialize()
  161. Calendar1.Format = 0
  162. Calendar1.value = DateFrm.PVDate21.value
  163. Command1.Visible = True
  164. Option1.Visible = True
  165. Option2.Visible = True
  166. Option3.Visible = True
  167. Option4.Visible = True
  168. Option5.Visible = True
  169. Calendar1.Visible = False
  170. Command2.Visible = False
  171. Label1.Visible = False
  172. TempLeft = Calendar1.Left
  173. Calendar1.Left = 20000
  174. End Sub
  175. Private Sub Form_Load()
  176. Calendar1.Format = 0
  177. Calendar1.value = DateFrm.PVDate21.value
  178. Command1.Visible = True
  179. Option1.Visible = True
  180. Option2.Visible = True
  181. Option3.Visible = True
  182. Option4.Visible = True
  183. Option5.Visible = True
  184. Calendar1.Visible = False
  185. Command2.Visible = False
  186. Label1.Visible = False
  187. End Sub
  188.